how to reduce capital gains